package com.leyou.order.inter.api;

import com.leyou.common.bean.Result;
import com.leyou.common.bean.ServerConstant;
import com.leyou.order.inter.fallback.OrderServiceFallbackFactory;
import com.leyou.order.inter.pojo.OrderDetail;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author zqq
 * @ClassName IOrderService
 * @Description
 * @date 2020/4/8-14:28
 */
@Component
@FeignClient(value = ServerConstant.ORDER_SERVICE_ID, fallbackFactory = OrderServiceFallbackFactory.class)
public interface IOrderService {

    @RequestMapping(value = "/web/query/order/detail/{id}", method = RequestMethod.GET, consumes = MediaType.APPLICATION_JSON_VALUE)
    Result<List<OrderDetail>> queryOrderDetail(@PathVariable("id") Long id);
}
